]> dgit.raspbian.org Git - gnome-shell.git/commit
calendar: Emit selected-date-changed before rebuilding the calendar
authorSebastian Keller <skeller@gnome.org>
Sun, 22 Oct 2023 23:06:59 +0000 (01:06 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 31 Oct 2023 22:45:56 +0000 (22:45 +0000)
commit38bf547ce7b31cd9f848cbcc33a8919472fe0bb9
treefca8b88c1de3a877cd83ab8ea4ddc19be21c976b
parentae5e8fa924fb073901a6b51a6d099a72733ba792
calendar: Emit selected-date-changed before rebuilding the calendar

If the cursor was placed on one of the widgets that get removed when
rebuilding the calendar due to a month change, destroying the hovered
widget will trigger a repick. This repick can then trigger an allocation
while not all buttons of the calendar are present.

If the last allocation before selected-date-changed is emitted was from
such an incomplete state, DateMenuButton will still freeze the layout in
this state in its signal handler.

What freezing the layout in DateMenuButton is supposed to do is to
prevent size changes of the menu when changing days, but for this the
layout needs to be frozen before potentially rebuilding calendar. This
change ensures that by emitting the signal earlier.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5411
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5469
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2989>
(cherry picked from commit 23bcff3348f63c5c10c8d3034665a55b747337c2)
js/ui/calendar.js